<?php

if ( !defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );

/**
 * 评论留言模块
 */
class CommentBox extends MY_Controller
{
    public function index( $postId )
    {
        //根据信息ID获取评论数据
        $commentData = $this->model_comment_formatByCid( $this->model_comment_getByPostId( $postId ) );
        
        $data = array(
            'postId' => $postId,
            'validUser' => $this->session->validUser(),
            'commentData' => $commentData,
        );
        return $this->load->view( 'comment_form', $data );
    }
}